feat(SimpleGraph/Trails): a walk is Eulerian iff it is a trail of length G.edgeSet.encard#41623
Conversation
SnirBroshi
commented
Jul 11, 2026
…gth `G.edgeSet.encard`
PR summary f2ff2a17f0Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Combinatorics.SimpleGraph.Paths | 597 | 783 | +186 (+31.16%) |
| Mathlib.Combinatorics.SimpleGraph.Trails | 633 | 784 | +151 (+23.85%) |
Import changes for all files
| Files | Import difference |
|---|---|
10 filesMathlib.Combinatorics.SimpleGraph.Clique Mathlib.Combinatorics.SimpleGraph.Coloring.VertexColoring Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex Mathlib.Combinatorics.SimpleGraph.Coloring Mathlib.Combinatorics.SimpleGraph.Partition Mathlib.Combinatorics.SimpleGraph.Prod Mathlib.Combinatorics.SimpleGraph.Sum Mathlib.Combinatorics.SimpleGraph.Triangle.Basic Mathlib.Combinatorics.SimpleGraph.Triangle.Counting Mathlib.Combinatorics.SimpleGraph.Triangle.Tripartite |
1 |
Mathlib.Combinatorics.SimpleGraph.Diam Mathlib.Combinatorics.SimpleGraph.Metric |
75 |
Mathlib.Combinatorics.SimpleGraph.Ends.Defs Mathlib.Combinatorics.SimpleGraph.Ends.Properties |
133 |
Mathlib.Combinatorics.SimpleGraph.Trails |
151 |
Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected |
180 |
4 filesMathlib.Combinatorics.SimpleGraph.Connectivity.WalkCounting Mathlib.Combinatorics.SimpleGraph.Paths Mathlib.Combinatorics.SimpleGraph.Walk.Counting Mathlib.Combinatorics.SimpleGraph.Walks.Counting |
186 |
Declarations diff (regex)
+ IsEulerian.finite_edgeSet
+ IsEulerian.length_eq_card_edgeFinset
+ IsEulerian.length_eq_ncard_edgeSet
+ IsTrail.encard_edgeSet
+ IsTrail.ncard_edgeSet
+ isEulerian_iff_isTrail_and_edgeSet_eq
+ isEulerian_iff_isTrail_and_length_eq_encard
+ isTrail_iff_encard_edgeSet_eq_length
+ isTrail_iff_ncard_edgeSet_eq_length
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
f2ff2a1).
- +10 new declarations
- −0 removed declarations
+SimpleGraph.Walk.IsEulerian.congr_simp
+SimpleGraph.Walk.IsEulerian.finite_edgeSet
+SimpleGraph.Walk.IsEulerian.length_eq_card_edgeFinset
+SimpleGraph.Walk.IsEulerian.length_eq_ncard_edgeSet
+SimpleGraph.Walk.IsTrail.encard_edgeSet
+SimpleGraph.Walk.IsTrail.ncard_edgeSet
+SimpleGraph.Walk.isEulerian_iff_isTrail_and_edgeSet_eq
+SimpleGraph.Walk.isEulerian_iff_isTrail_and_length_eq_encard
+SimpleGraph.Walk.isTrail_iff_encard_edgeSet_eq_length
+SimpleGraph.Walk.isTrail_iff_ncard_edgeSet_eq_lengthNo changes to strong technical debt.
No changes to weak technical debt.
Current commit f2ff2a17f0
Reference commit 4efb186f10
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).